﻿using oldislandapi.IService;
using oldislandapi.Models;
using System.Linq.Expressions;

namespace oldislandapi.Service
{
    public class FavorService : IFavorService
    {
        public async Task<Favor> GetSingleDataAsync(Expression<Func<Favor, bool>> expression) =>
            await DBContext.DB.Queryable<Favor>().Where(expression).OrderBy(x => x.Updated_At, SqlSugar.OrderByType.Desc).FirstAsync();
    }
}
